
<?php 
include_once("DataProvider.php");
$sql = "select * from tbl_categories order by stt";
$i=0;
$result = DataProvider::ExecuteQuery($sql);
$count = mysql_num_rows($result);

echo "<ul>";
while($row = mysql_fetch_array($result))
{
	$i++;
	if($i<$count)
	{
	?>
	<li><a  href="index.php?ref=<?php  echo $row["idCategories"]; ?>"><?php echo $row["categories"]; ?></a></li>
    <?php
	}
	else
	{
		?>
        <li class="last"><a href="index.php?ref=<?php  echo $row["idCategories"]; ?>"><?php echo $row["categories"]; ?></a></li>
        <?php
	}
}
echo "</ul>";
?>
